package pack0812;
//定义一个类
public class DiYiCiZuoJavaDiaoYong {
    //这也是变量，成员属性
    String name;
    int age;
    char sex;
    double height;

    //方法
    public void eat(){
        System.out.println(name+"吃了面");
    }
    public void coding(){
        System.out.println(name+"正在写代码，无心吃饭。");
    }

    public static void main(String[] args) {
        //如何产生对象  new
        //类 对象名 = new 类（）;
        DiYiCiZuoJavaDiaoYong a1 = new DiYiCiZuoJavaDiaoYong();
        a1.name = "张三";
        a1.age = 26;
        a1.height = 180;
        a1.sex = '男';
        a1.eat();
        a1.coding();

    }
}
